using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Outpatient.Doman.Smart
{
    /// <summary>
    /// 就医指南实体类
    /// </summary>
    [Table("Guide")]
    public class Guide
    {
        /// <summary>
        /// 指南唯一标识 - 主键，自增
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int GuideId { get; set; }

        /// <summary>
        /// 指南标题
        /// </summary>
        [Required]
        [StringLength(255)]
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 指南内容 - 富文本格式，含步骤说明、注意事项等
        /// </summary>
        [Required]
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 所属医院ID - 外键
        /// </summary>
        [Required]
        public int HospitalId { get; set; }

        /// <summary>
        /// 分步说明
        /// </summary>
        public string? Steps { get; set; }

        /// <summary>
        /// 浏览次数
        /// </summary>
        public int Views { get; set; } = 0;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdatedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 导航属性 - 关联的医院信息
        /// </summary>
        [ForeignKey("HospitalId")]
        public virtual Hospital? Hospital { get; set; }
    }
} 